package com.lhd.qd.common.consts;

/**
 * 详细错误码
 * 起始值1000，每100个为一类
 * 命名：类别_具体描述
 */
public enum ErrorCodeEnum {

    /**
     * 权限
     */
    AUTHORIZATION_URI_SETTING_ERROR(1301, "接口URI设置错误"),
    AUTHORIZATION_ERROR(1300, "鉴权异常"),

    /**
     * redis
     */
    REDIS_EMPTY_KEY(1200, "键不能为空"),

    /**
     * 关系型数据库
     */
    DB_DATA_INTEGRITY_VIOLATION(1100, "数据完整性异常"),

    UNKNOWN_ERROR(1000, "未知异常");

    private Integer code;
    private String msg;

    ErrorCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
